#include <iostream>
using namespace std;

template <class T=double, int N=100>
class tempArray 
{
private:
    T memoryBlock [N];
public:
    void setMember (int x, T value);
    T getMember (int x);
};

template <class T, int N>
void tempArray<T,N>::setMember (int x, T value) 
{
  memoryBlock[x]=value;
}

template <class T, int N>
T tempArray<T,N>::getMember (int x) 
{
  return memoryBlock[x];
}

int main () 
{
  tempArray <int,5> myints;
  tempArray <float> myfloats;
  myints.setMember (0,100);
  myfloats.setMember (3,3.1416);
  cout << myints.getMember(0) << '\n';
  cout << myfloats.getMember(3) << '\n';
  //cout << myfloats.getMember(1) << '\n';
  return 0;
}